<?php

Yii::import('zii.widgets.CPortlet');

class ListCategoriesWidget extends CPortlet {

    public function init() {
        //$this->title = Shop::t('Product Categories');
        return parent::init();
    }

    public function run() {

        $dataProvider=new CActiveDataProvider('Category',array(
            'criteria'=>array(
                'condition'=>'parent_id = 0'
            )
        ));
        $dataProvider->pagination->pageSize=5;
        $this->render('application.modules.shop.views.category.list',
                array('dataProvider'=>$dataProvider)
        );
        return parent::run();
    }

}

?>
